package sort;

public class basic912 {


    public int[] sortArray(int[] nums) {
//        int[] sorted_nums = new int[0];

        for (int i = 0; i < nums.length; i++) {
            for (int j = i+1; j < nums.length ; j++) {
                if (nums[i]>nums[j]){
                    int temp=nums[i];
                    nums[i]=nums[j];
                    nums[j]=temp;
                }
            }
        }
  return  nums;
    }

    public static void main(String[] args) {
        basic912 basic912 = new basic912();
        int[] ints = basic912.sortArray(new int[]{4, 8, 2, 3, 6});
        for (int a:
             ints) {
            System.out.println(a);

        }

    }


}

